﻿/*
 *  PassBag is multi-platform software that securely manage/store passwords
 *  Copyright (C) <2009>  <Hugo Rodrigues PEREIRA>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *	
 *  You can find a copy of the GPLv3 at project <root directory>/gpl.txt
 *
 */

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;


namespace PassBag.Presentation {
    public class MessageDialog {
        private static string _caption = Properties.Resources.Global_ApplicationName;

        public static void ShowError (IWin32Window owner, string message) {
            MessageBox.Show (owner, message, _caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        public static void ShowInformation (IWin32Window owner, string message) {
            MessageBox.Show (owner, message, _caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        public static void ShowExclamation (IWin32Window owner, string message) {
            MessageBox.Show (owner, message, _caption, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
        }

        public static bool ShowQuestion (IWin32Window owner, string message) {
            return (MessageBox.Show (owner, message, _caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) ? true : false;
        }

    }
}
